/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * BrowsePanel.java
 *
 * Created on May 18, 2009, 11:18:43 AM
 */

package GUI;

/**
 *
 * @author cs47402_08
 */
public class BrowsePanel extends javax.swing.JPanel {

    /** Creates new form BrowsePanel */
    public BrowsePanel() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        peerInfoScrollPane = new javax.swing.JScrollPane();
        peerInfoListBox = new javax.swing.JList();
        peerInfoLabel = new javax.swing.JLabel();
        currentDownloadsLabel = new javax.swing.JLabel();
        currentDownloadsScrollPane = new javax.swing.JScrollPane();
        currentDownloadsList = new javax.swing.JList();
        detailsListBoxScrollPane = new javax.swing.JScrollPane();
        detailsListBox = new javax.swing.JList();
        detailsLabel = new javax.swing.JLabel();
        downloadsTitleLabel = new javax.swing.JLabel();
        cancelDownloadButton = new javax.swing.JButton();

        setPreferredSize(new java.awt.Dimension(470, 300));

        peerInfoListBox.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Physical location", "Uplink speed", "share ratio", "Others" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        peerInfoListBox.setEnabled(false);
        peerInfoListBox.setFocusable(false);
        peerInfoListBox.setPreferredSize(new java.awt.Dimension(80, 70));
        peerInfoListBox.setRequestFocusEnabled(false);
        peerInfoScrollPane.setViewportView(peerInfoListBox);

        peerInfoLabel.setText("Peer Information");

        currentDownloadsLabel.setText("Current Downloads");

        currentDownloadsList.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        currentDownloadsScrollPane.setViewportView(currentDownloadsList);

        detailsListBox.setModel(new javax.swing.AbstractListModel() {
            String[] strings = { "Current speed", "Peer ID", "Share ratio", "Peer location", " " };
            public int getSize() { return strings.length; }
            public Object getElementAt(int i) { return strings[i]; }
        });
        detailsListBox.setEnabled(false);
        detailsListBox.setPreferredSize(new java.awt.Dimension(71, 70));
        detailsListBoxScrollPane.setViewportView(detailsListBox);

        detailsLabel.setText("Download Details");

        downloadsTitleLabel.setFont(new java.awt.Font("Lucida Bright", 0, 18));
        downloadsTitleLabel.setText("Downloads");

        cancelDownloadButton.setText("Cancel");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(downloadsTitleLabel)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(currentDownloadsScrollPane, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(peerInfoScrollPane, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE))
                            .addComponent(peerInfoLabel))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(detailsListBoxScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 186, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(detailsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(currentDownloadsLabel))
                .addContainerGap(19, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(375, Short.MAX_VALUE)
                .addComponent(cancelDownloadButton)
                .addGap(30, 30, 30))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(downloadsTitleLabel)
                .addGap(13, 13, 13)
                .addComponent(currentDownloadsLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(currentDownloadsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 77, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(detailsLabel)
                    .addComponent(peerInfoLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(peerInfoScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(detailsListBoxScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(cancelDownloadButton)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton cancelDownloadButton;
    private javax.swing.JLabel currentDownloadsLabel;
    private javax.swing.JList currentDownloadsList;
    private javax.swing.JScrollPane currentDownloadsScrollPane;
    private javax.swing.JLabel detailsLabel;
    private javax.swing.JList detailsListBox;
    private javax.swing.JScrollPane detailsListBoxScrollPane;
    private javax.swing.JLabel downloadsTitleLabel;
    private javax.swing.JLabel peerInfoLabel;
    private javax.swing.JList peerInfoListBox;
    private javax.swing.JScrollPane peerInfoScrollPane;
    // End of variables declaration//GEN-END:variables

}
